package com.easy.tool.entity;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 高俊
 * @create 2024-02-2024/2/8-10:43
 */
@Data
public class JwtEntity {
    public JwtEntity() {
    }

    public JwtEntity(String secret, int expire, Map<String, Object> payload) {
        this.secret = secret;
        this.expire = expire;
        this.payload = payload;
    }

    public JwtEntity(Map<String, Object> header, String secret, int expire, Map<String, Object> payload) {
        this.header = header;
        this.secret = secret;
        this.expire = expire;
        this.payload = payload;
    }

    /**
     * header
     */
    private Map<String,Object> header = new HashMap<>();

    /**
     * 密钥
     */
    private String secret;

    /**
     * 过期时间，单位：s
     */
    private int expire;

    /**
     * payload map
     */
    private Map<String,Object> payload;


}